package src

import (
	"github.com/gin-gonic/gin"
	"net/http"
)

type artile struct {
	Id    int
	Title string
	Desc  string
}

func TestSyntax(ctx *gin.Context) {

	name := "Jackson"

	arr := []int{11, 22, 33, 44}

	my_article := artile{
		Id:    1,
		Title: "西游记",
		Desc:  "精彩内容,不要错过!",
	}

	map_data := map[string]interface{}{
		"name":       name,
		"arr":        arr,
		"birth":      "1999-01-01",
		"my_article": my_article,
	}

	ctx.HTML(http.StatusOK, "syntax1/index.html", map_data)

}
